package com.cimp.service.c2.client;

/**
 * [简要描述]:
 * [详细描述]:
 *
 * @author huojinhao
 * @date 2019/1/8
 */
import java.io.Serializable;
import javax.xml.namespace.QName;
import org.apache.axis.description.ElementDesc;
import org.apache.axis.description.TypeDesc;
import org.apache.axis.encoding.Deserializer;
import org.apache.axis.encoding.Serializer;
import org.apache.axis.encoding.ser.BeanDeserializer;
import org.apache.axis.encoding.ser.BeanSerializer;

public class CSPResult implements Serializable {
    private int result;
    private String errorDescription;
    private Object __equalsCalc = null;
    private boolean __hashCodeCalc = false;
    private static TypeDesc typeDesc = new TypeDesc(CSPResult.class, true);

    static {
        typeDesc.setXmlType(new QName("iptv", "CSPResult"));
        ElementDesc elemField = new ElementDesc();
        elemField.setFieldName("result");
        elemField.setXmlName(new QName("", "Result"));
        elemField.setXmlType(new QName("http://www.w3.org/2001/XMLSchema", "int"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new ElementDesc();
        elemField.setFieldName("errorDescription");
        elemField.setXmlName(new QName("", "ErrorDescription"));
        elemField.setXmlType(new QName("http://schemas.xmlsoap.org/soap/encoding/", "string"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
    }

    public CSPResult() {
    }

    public CSPResult(int result, String errorDescription) {
        this.result = result;
        this.errorDescription = errorDescription;
    }

    public int getResult() {
        return this.result;
    }

    public void setResult(int result) {
        this.result = result;
    }

    public String getErrorDescription() {
        return this.errorDescription;
    }

    public void setErrorDescription(String errorDescription) {
        this.errorDescription = errorDescription;
    }

    public synchronized boolean equals(Object obj) {
        if (!(obj instanceof CSPResult)) {
            return false;
        } else {
            CSPResult other = (CSPResult)obj;
            if (obj == null) {
                return false;
            } else if (this == obj) {
                return true;
            } else if (this.__equalsCalc != null) {
                return this.__equalsCalc == obj;
            } else {
                this.__equalsCalc = obj;
                boolean _equals = this.result == other.getResult() && (this.errorDescription == null && other.getErrorDescription() == null || this.errorDescription != null && this.errorDescription.equals(other.getErrorDescription()));
                this.__equalsCalc = null;
                return _equals;
            }
        }
    }

    public synchronized int hashCode() {
        if (this.__hashCodeCalc) {
            return 0;
        } else {
            this.__hashCodeCalc = true;
            int _hashCode = 1;
            _hashCode = _hashCode + this.getResult();
            if (this.getErrorDescription() != null) {
                _hashCode += this.getErrorDescription().hashCode();
            }

            this.__hashCodeCalc = false;
            return _hashCode;
        }
    }

    public static TypeDesc getTypeDesc() {
        return typeDesc;
    }

    public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) {
        return new BeanSerializer(_javaType, _xmlType, typeDesc);
    }

    public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) {
        return new BeanDeserializer(_javaType, _xmlType, typeDesc);
    }
}
